package com.dokimall.member.config;

import com.dokimall.member.interceptor.MemberInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @ClassName: MemberWebConfig
 * @Description:
 * @Author
 * @Date 2021/11/1
 * @Version 1.0
 */

@Configuration
public class MemberWebConfig implements WebMvcConfigurer {

    @Autowired
    MemberInterceptor memberInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(memberInterceptor).addPathPatterns("/**");
    }
}
